package com.doit.demo06;

import java.io.File;

public class test_show {
    public static void main(String[] args) {
        File file = new File("E:");
        show(file);
    }

    private static void show(File file) {
        File[] files = file.listFiles();
        for (File file1 : files) {
            if(file1.isFile())
            {
//                System.out.println(file1);
                boolean equals = file1.getName().toLowerCase().endsWith(".java");
                if(equals)
                    System.out.println(file1);
            }
            else
                show(file1);
        }
    }
}
